var EEvent=new Class({
	
	Extends: ECause,
	ele:null,
	event:null,
	
	initialize:function(Name,Notes,Ele,Event){
		this.parent(Name,Notes);
		this.setEle(Ele);
		this.setEvent(Event);
		this.type="event";
	},
	
	setEle:function(e){
		this.ele=e;
	},
	
	setEvent:function(e){
		this.event=e;
	},
	
	getEle:function(){
		return this.ele;
	},
	
	getEvent:function(){
		return this.event;
	},

	destroy:function(){
		
		this.parent.destroy();
		this.event=null;
		this.element=null;
		
	},
	getCauseCode:function(){
		//creo la stringa iniziale per gli eventi
		var EventCode='document.getElementById("'+this.getEle().getAttribute('id')+'")';
		EventCode +='.'+this.getEvent().toLowerCase()+'=function(){';
		EventCode+= this.parent();
		return EventCode;
	}

});